Hello Stacey,
Doing a partial refresh to show a dialog with a partial bar and running an agent should work. I did use the same construction. Below is a simple sample XPage that shows how I did it.
Note that I've set the indeterminate property of the progress bar to true, since I cannot give feedback to the user what progress the agent has made. I only know that it is running until the refresh is complete. When the agent is finished, the code in the onComplete event is called to hide the progress dialog.
Good luck,
Mark
<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core" dojoTheme="true">
<xp:this.resources>
<xp:dojoModule name="dijit.Dialog"></xp:dojoModule>
<xp:dojoModule name="dijit.ProgressBar"></xp:dojoModule>
</xp:this.resources>
<xp:button value="Start server agent" id="button1">
<xp:eventHandler event="onclick" submit="true"
refreshMode="partial" refreshId="computedField1">
<xp:this.script><![CDATA[var progressBar = new dijit.ProgressBar({indeterminate:true, layoutAlign: "left"});
progressDlg = new dijit.Dialog( {
title:"Please wait...",
content: progressBar,
style: "width: 150px"
});
progressDlg.show();]]></xp:this.script>
<xp:this.onComplete><![CDATA[progressDlg.hide();]]></xp:this.onComplete>
<xp:this.action><![CDATA[#{javascript:var agent = database.getAgent("MyAgent");
agent.run();}]]></xp:this.action>
</xp:eventHandler>
</xp:button>
<br /><br />
Current (server) time in milliseconds (will be refreshed/ updated when agent is finished): 
<xp:text escape="true" id="computedField1"
value="#{javascript:new Date().getTime();}">
<xp:this.converter>
<xp:convertNumber type="number" integerOnly="true"></xp:convertNumber>
</xp:this.converter>
</xp:text>
</xp:view>